package parser;
import renderernode.*;

public class Renderer implements Visitor {

	private Display theDisplay;
	private State state; //(contains boolean variables corresponding to bold, underline, italic etc)
	
	
	Renderer()
	{
	theDisplay=new theDisplay;
	
		
	}
	
	
	
	public void visit(FormatNode node) {
		node.drawNode();
		for(child : node.children) {
			visit(child);
		}
		node.drawNode();
	}


	public void visit(TableNode node) {
		node.drawNode();
		for(child : node.children) {
			visit(child);
		}
		node.addTable();
	}

	public void visit(TableRowNode node) {
		node.drawNode();
		for(child : node.children) {
			visit(child);
		}
	}


	public void visit(TableDataNode node) {
		node.drawNode();
	}



	public void visit(LeafNode node) {
		node.drawNode();
	}

	public void visit(BranchNode node) {
		node.drawNode();
		for (child : node.children) {
			visit(child);
		}
	}


	public void visit(ListNode node) {
		node.drawNode();
	}

	

	


}
